package org.testis.utils.middleware;

import org.orm.PersistentException;
import org.testis.orm.classes.T_dmap_abstract_objects;
import org.testis.orm.classes.T_dmap_abstract_objectsCriteria;

/**
 * 
 * @author nurhat
 */
public class DynamicMapAbstractionPairs extends DbConnectionSupplier {

    public boolean IsAbstractIdExist(String abstractionId) {
	T_dmap_abstract_objects[] pairs = null;
	try {
	    T_dmap_abstract_objectsCriteria criteria = new T_dmap_abstract_objectsCriteria();
	    criteria.name.eq(abstractionId);
	    pairs = criteria.listT_dmap_abstract_objects();

	} catch (PersistentException ex) {
	}
	if (pairs == null) {
	    return false;
	}
	if (pairs.length <= 0) {
	    return false;
	}
	return true;
    }
}
